package com.yzk.auction.service;

import com.yzk.auction.dao.OrderDao;
import com.yzk.auction.entity.OrderAll;

import java.util.List;


public class OrderSerivce {
    public static List<OrderAll> listOrder(){
        List<OrderAll> list = null;
        list= OrderDao.query();
        return list;
    }
    public static int odelete(String order_id){
        int i = 0;
        i = OrderDao.sql_update("DELETE FROM tb_orders WHERE order_id="+order_id+";");
        return i;
    }

    public static int oupdate(String user_name,String user_addr){
        int i = 0;
        i = OrderDao.sql_update("Update tb_users set user_addr='"+user_addr+"' where user_name='"+user_name+"';");
        return i;
    }

}


